COM AT+CGTFT - Traffic Flow Template
COM V1.0	05.01.2005	T. Kleinmann

from attglobals import *

COM <H2>ToDo: This command is not completely understood, so more research is necessary to test in more detail!</H2>
COM <H2>This has to be checked.</H2>

COM Enable extended error messages in text mode
AT+CMEE=2
WAIT FOR OK

#Define PDP context for template first
#ATCMD(1,'AT+CGDCONT=1,"IP","internet.t-d1.de"')
ATCMD(1,'AT+CGDCONT=1,"IP","',AccessPointName,'"')
WAIT FOR OK

for i in range (1,9):
	ATCMD(1,'AT+CGTFT=1,',i,',255,62.255.70.10.255.255.255.255,0,0.65535,0.65535,,0.255')
	WAIT FOR OK
	
ATCMD(1,'AT+CGTFT=1,',9,',255,62.255.70.10.255.255.255.255,0,0.65535,0.65535,,0.255')
WAITFOR (1,'+CME ERROR: invalid index')

AT+CGTFT?
WAIT FOR OK

AT+CGTFT=1
WAIT FOR OK

AT+CGTFT?
WAIT FOR OK

AT
WAIT FOR OK
